{
  "properties" : { },
  "id" : "fd1bcf48628146039e9fa8b135419a22",
  "script" : null,
  "groupId" : "c4dd1f80725a4e8087f5e20ec2ade951",
  "name" : "重命名文件夹",
  "createTime" : null,
  "updateTime" : 1666775238732,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "/renameFolder",
  "description" : null,
  "returnType" : null,
  "mappingPath" : null,
  "parameters" : [ {
    "name" : "oldPath",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : "java.lang.String",
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "newPath",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : "java.lang.String",
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ]
}
================================
//导入java.io.File包
import java.io.File;
//读取上传文件根目录
import '@/evn/fileRootPath' as fileRootPath;

var old_path = fileRootPath() + oldPath;
System.out.println("原路径:" + old_path);
var new_path = fileRootPath() + newPath + "/" + body.libraryName;
System.out.println("新路径:" + new_path);
File file = new File(old_path)
boolean result = file.renameTo(new File(new_path));
if (result) {
    System.out.println("路径" + new_path + "修改成功");
} else {
    System.out.println("路径" + new_path + "修改失败");
}
return result;